﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TakePhotoTogether.Communication.Protocols
{
    class ViewStateData : PayloadData
    {
        private ViewState state = ViewState.None;

        public ViewState State
        {
            get { return state; }
        }

        public ViewStateData(ViewState currentState)
        {
            state = currentState;
        }

        public ViewStateData(byte[] data)
        {
            state = (ViewState)((int)data[0]);
        }

        public byte[] ToBytes()
        {
            byte[] data = new byte[] { (byte)((int)state) };

            return data;
        }

    }
}
